Methods of multiplexing and demultiplexing data are known.
A known demultiplexer for demultiplexing channel data for a plurality of channels is described below. During each of a series of channel-time-units, the demultiplexer receives multiplexed data, for example as a multiplexed data stream. For each of the plurality of channels, a corresponding quantity of channel data for that channel is contained within the received multiplexed data. The demultiplexer then identifies the quantity of channel data for a channel and stores that channel data in a memory.
The demultiplexer divides its memory into a predetermined number of equally sized memory regions, one for each possible channel that the demultiplexer is arranged to handle. The number of channels currently being handled by the demultiplexer may be less than the maximum number of channels that the demultiplexer can handle. However, the demultiplexer divides its memory into a number of equally sized memory regions equal to this maximum number of channels to cater for the situation in which the number of channels within the multiplexed data stream increases to this maximum number of channels. The demultiplexer stores the channel data for a channel in a memory region corresponding to that channel.
For each channel, after a corresponding number of channel-time-units has passed, the channel data stored in the memory for that channel is processed. Once the channel data stored in the region of the memory associated with a channel has been processed, then that memory region is free for re-use, i.e. that memory region can be re-used to store subsequently demultiplexed channel data for that channel or for other channels.
A known multiplexer for multiplexing channel data for a plurality of channels is described below. During each of a series of channel-time-units, the multiplexer outputs multiplexed data, for example as a multiplexed data stream. For each of the plurality of channels, a corresponding quantity of channel data for that channel is contained within the output multiplexed data. The multiplexer stores channel data for each of the channels in a memory. During each of the series of channel-time-units, the multiplexer identifies a quantity of channel data for a channel to output from the channel data being stored in the memory for that channel.
The multiplexer divides the memory into a predetermined number of equally sized memory regions, one for each possible channel that the multiplexer is arranged to handle. The number of channels currently being handled by the multiplexer may be less than the maximum number of channels that the multiplexer can handle. However, the multiplexer divides its memory into a number of equally sized memory regions equal to this maximum number of channels to cater for the situation in which the number of channels that it is to handle increases to this maximum number of channels. The multiplexer stores the channel data for a channel in the memory region corresponding to that channel.
For each channel, after a corresponding number of channel-time-units has passed, the multiplexer stores fresh channel data in the memory for that channel. During the next corresponding number of channel-time-units for that channel, this fresh channel data will be output as one or more quantities of channel data within the output multiplexed data. At the end of the next corresponding number of channel-time-units for that channel, all of the fresh channel data will have been output, so that the memory region for that channel is then free, i.e. the multiplexer can then re-use that memory region to store a new amount of channel data for that channel or for other channels.